// 混入封装

import BackTop from "components/common/backtop/BackTop";

export const backTopMixin={
  data(){
    return {
      isShowBackTop: false,
    }
  },
  components: {
    BackTop
  },
  methods:{
    // 回到顶部
    backClick(){
      this.$refs.scroll.scrollTo(0,0,2000);
    },
    listenShowBackTop(position){
      this.isShowBackTop=(-position.y)>1000;
    }
  }
}
